package ctbu.edu.cn.dp101.exception;

import ctbu.edu.cn.dp101.constant.REnum;
import lombok.Getter;
import lombok.Setter;

/**
 * 扩展运行异常
 */
@Getter
@Setter
public class RException extends RuntimeException {

    private Integer code;

    private RException(Integer code, String message) {
        super(message);
        this.code = code;

    }

    public RException(REnum rEnum){
        super(rEnum.getMsg());
        this.code = rEnum.getCode();

    }

}
